package Proxy

import "fmt"

type ITask interface {
	RentHouse(desc string, price int)
}

// 我的任务
type Task struct {
}

func (t *Task) RentHouse(desc string, price int) {
	fmt.Printf("地址在%v,价格%v \n", desc, price)
}

//中介代理了我的任务
type AgentTask struct {
	task *Task
}

func NewAgentTask() *AgentTask {
	return &AgentTask{task: &Task{}}
}

func (t *AgentTask) RentHouse(desc string, price int) {
	t.task.RentHouse(desc, price)
}
